<template>
    <view class="img-wrap">
        <image class="img" mode="aspectFit" :src="icon" />
        <text class="text">{{ text }}</text>
    </view>
</template>
<script>
    import icon from './img/empty.png';

    export default {
        name: 'Empty',
        props: {
            text: {
                type: String,
                default: '暂无数据',
            },
        },
        data() {
            return {
                icon
            }
        }
    };
</script>
<style lang="scss" scoped>
    .img-wrap {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .img {
        width: 22rem;
        height: 22rem;
    }

    .text {
        font-size: 3rem;
        margin-top: 10rem;
        color: #777;
    }
</style>